import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'
import RouterView from '../router/RouterView'

class Home extends Component {
    render() { 
        let { child, navlist } = this.props
        return (
            <div className='Home'>
                <div className='main'>
                    <RouterView RouterList={child} />
                </div>
                <div className='footer'>
                    {
                        navlist && navlist.length ? navlist.map((item,index) => {
                            return <NavLink key={index} to={item.path}>{item.name}</NavLink>
                        }) : ''
                    }
                </div>
            </div>
        )
    }
}
 
export default Home